package com.boluo.common.utils;

import java.math.BigDecimal;

/**
 * @Author boluo
 * @Date 2023/4/11 14:37
 * @注释
 */
public abstract class CarUtils {

    public static boolean isLicensePlate(String licensePlate) {
        if (StringUtils.isEmpty(licensePlate)) {
            return false;
        }
        String regex = "^(([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领][A-Z](([0-9]{5}[DF])" +
                "|([DF]([A-HJ-NP-Z0-9])[0-9]{4})))" +
                "|([京津沪渝冀豫云辽黑湘皖鲁新苏浙赣鄂桂甘晋蒙陕吉闽贵粤青藏川宁琼使领]" +
                "[A-Z][A-HJ-NP-Z0-9]{4}[A-HJ-NP-Z0-9挂学警港澳使领]))$";
        return licensePlate.matches(regex);
    }

}
